<?php

/**
 * Prado Portal.
 *
 * @author Steen Rabol <steen.rabol@gmail.com>
 * @link http://www.pradoportal.dk/
 * @copyright Copyright &copy; 2006,2007,2008 Steen Rabol
 * @license http://www.pradoportal.dk
 * @version $Id: PortalUrlMapping.php 289 2008-11-14 05:34:40Z steen.rabol@gmail.com $
 *
 */

Prado::using('System.Web.TUrlMapping');
Prado::using('Application.Common.Data.PortalPageRecord');

class PortalUrlMapping extends TUrlMapping
{
	public function init($xml)
	{
		parent::init($xml);
	}


	/**
	 * @param string external configuration file in namespace format. The file
	 * must be suffixed with '.xml'.
	 * @throws TInvalidDataValueException if the file is invalid.
	 */
	public function setConfigFile($value)
	{
		// In a new installation the urlmap file might not exists
		$cfgfile = Prado::getPathOfNamespace($value,self::CONFIG_FILE_EXT);
		if($cfgfile !== null && !empty($cfgfile) && file_exists($cfgfile))
		{
			parent::setConfigFile($value);
		}
		else
		{
			$this->EnableCustomUrl	= false;
		}
	}

}
?>